
#pragma once
#include "BaseSocket.h"

class CListenSocket : public CBaseSocket
{
public:
	CListenSocket();
	~CListenSocket() override;
	virtual bool Start(u_short port, intptr_t maxClientNum);
	void Stop(bool wait) override;
	void ProcThread() override;
protected:
	virtual LPVOID initClientThread() = 0;
	virtual void doneClientThread() = 0;
	virtual bool startClientThread(SOCKET cltSock) = 0;
	virtual void procStarted(){}
	virtual void procIdle(){}
	virtual void procFinished(){}

	u_short m_port;
	intptr_t m_ClientNum;
	LPVOID pClientThread;
};
